home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d20
/
ts2gmd.arc
/
TS2GMD.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1991-12-19
|
1KB
|
41 lines
{$M 4096,0,1024}
uses
dos,
crt,
(* Blaise Computing libraries *)
unit_sup,
unit_str,
unit_pgm;
var
I : byte;
programname,
command : _Path;
error : word;
spawnerrorcode,
unarchivererrorcode : byte;
begin
(* write copyright *)
Writeln;
Writeln;
Writeln(' ts2gmd v1.0 (c) 1991 r.soubie 2:324/1. tosscan to gmd i/f, use at will.');
Writeln;
(* parse command line supplied by tosscan or other *)
command := '';
For i := 2 to Paramcount do command := command + ' ' + Paramstr(i);
(* remove leading and multiple spaces, along with tabs, crs and lfs *)
command := __CvtStr(command,_REM_LEAD_WHITE_STR+
_REDUCE_WHITE_STR+
_DISCARD_STR);
programname := __CvtStr(Paramstr(1),_TO_UPCASE_STR);
(* spawn unarchiver (must be in path) *)
__SpawnPgm(programname,command,error);
(* store unarchiver's exit code *)
unarchivererrorcode := __WaitPgm(spawnerrorcode);
Writeln;
(* spawn GMD (must be in path) *)
__SpawnPgm('GMD.EXE','',error);
Writeln;
(* back to TosScan *)
Halt(unarchivererrorcode);
end.